home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Digital Talk 55
/
Digital_Talk_55_2002-06-10_Digital_Talk_de_Side_C.d64
/
t&t joy + char
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
1KB
|
61 lines
0 :rem freisoft demo-spiel
1 :rem steuerung eines zeichens
2 :rem mit joystick oder tastatur
3 :rem (dirk breitinger 2002)
4 :
5 :
19 :goto2000:
20 :save"@0:t&t joy+char",8:return:
21 :
22 :
23 :
140 :rem----joystick & tasten-abfrage
141 :geta$:j=31-peek(jo)and31:on-(j=.anda$="")goto141:ifj=.then:return
142 :ifjand1then:a$="[145]":return
143 :ifjand2then:a$="":return
144 :ifjand4then:a$="[157]":return
145 :ifjand8then:a$="":return
146 :a$=r$:return:---feuer
147 :
148 :
149 :
2000 :rem==============================
2001 :rem variablen
2002 :rem==============================
2003 :
2004 :jo=56320:r$=chr$(13):fi$="[158][146][209][157]":
2005 :deffnp(a)=peek(peek(209)+peek(210)*256+pos(.)+a)
2006 :
2010 :print"[147][142]zeichen steuerung per joystick[159]":a=0
2011 :printtab(a)" "
2012 :printtab(a)" "
2013 :printtab(a)" [146] [146] "
2014 :printtab(a)" "spc(6)"e[159]"
2015 :printtab(a)"[146] "spc(5)"[146][153][193][193][193][193]":
2016 :di=0
2020 :xa=0:xe=39:ya=1:ye=23::x=0:y=4
2098 :
2099 :
2100 :rem==============================
2101 :rem steuerung
2102 :rem==============================
2105 :poke214,y:poke211,x:sys58640:
2106 :
2110 :print" [157]"a$fi$;
2111 :gosub140:
2112 :ifa$=""then:ifx<xethen:x=x+1:c=1:goto2130
2113 :ifa$="[157]"then:ifx>xathen:x=x-1:c=-1:goto2130
2114 :ifa$="[145]"then:ify>yathen:y=y-1:c=-40:goto2130
2115 :ifa$=""then:ify<yethen:y=y+1:c=40:goto2130
2120 :on1-(a$="[133]")-2*(a$="[148]")goto2111,2200,3300:
2126 :
2130 :rem---bewegungen auswerten
2131 :p=fnp(c)::ifp=32goto2110
2132 :ifp=65then:di=di+1:goto2110:
2133 :
2134 :ifp=133goto2140:rem---ende
2135 :y=y+(c>1)-(c<-1):x=x+(c=1)-(c=-1):goto2111:rem---keine bewegung
2140 :rem---ende
2141 :print" [157]"a$fi$;:poke214,18:printr$"gesammelt[146]:";di
2142 :gosub140:end